<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>


<%@ page
	import="java.io.InputStreamReader,java.io.IOException,java.io.PrintWriter,java.sql.ResultSet,
java.util.ArrayList,javax.servlet.ServletException,javax.servlet.annotation.WebServlet,javax.servlet.http.HttpServlet,

javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,org.apache.log4j.Logger,com.grantha.util.DB,com.mysql.jdbc.Connection
,com.mysql.jdbc.PreparedStatement"%>


<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<jsp:include page="/jsp/header.jsp" />
<title>ViewBooks</title>
</head>
<body>
	<div class="page2" style="width: 680px;">
		<form id="viewBooksForm" method="post" name="viewbooks"
			novalidate="novalidate" onsubmit="return emptyField()">
			<div class="error" style="display: none;">
				<img src="${WEB_BASE }images/warning.gif" alt="Warning!" width="24"
					height="24" style="float: left; margin: -5px 10px 0px 0px;">

				<span></span>.<br clear="all">
			</div>

			<div id="vwcontainer">



				<table>



					<%
						String bookno1 = "", author1 = "", title1 = "", publisher1 = "", isbn1 = "", subject1 = "", edition1 = "", year1 = "", pages1 = "", cost1 = "", volume1 = "", source1 = "", billno1 = "", moreinfo1 = "";
						try {
							String bookNo = request.getParameter("bookNo");

							ResultSet rs = DB.search(
									"select * from bookregister where bookno = ?", bookNo);
							if (rs.next()) {
								bookno1 = rs.getString("bookno");
								author1 = rs.getString("author");
								title1 = rs.getString("title");
								publisher1 = rs.getString("publisher");
								isbn1 = rs.getString("isbn");
								subject1 = rs.getString("subject");
								edition1 = rs.getString("edition");
								year1 = rs.getString("year");
								pages1 = rs.getString("pages");
								cost1 = rs.getString("cost");
								volume1 = rs.getString("volume");
								source1 = rs.getString("source");
								billno1 = rs.getString("billno");
								moreinfo1 = rs.getString("moreinfo");

							}

							rs.close();

						}

						catch (Exception e) {
							System.err.print("Sorry");
						}
					%>
					<tr>
						<td>Accession Number:</td>
						<td><input type="text" name="accno" value="<%=bookno1%>"
							style="width: 250px;" /></td>
					</tr>
					<tr>
						<td>Author:</td>
						<td><input type="text" name="author" value="<%=author1%>"
							style="width: 250px;" /></td>
					</tr>
					<tr>
						<td>Title:</td>
						<td><input type="text" name="title" value="<%=title1%>"
							style="width: 250px;" /></td>
					</tr>
					<tr>
						<td>Publisher:</td>
						<td><input type="text" name="pubname" value="<%=publisher1%>"
							style="width: 250px;" /></td>
					</tr>
					<tr>
						<td>ISBN:</td>
						<td><input type="text" name="isbn" value="<%=isbn1%>"
							style="width: 250px;" /></td>
					</tr>
					<tr>
						<td>Subject:</td>
						<td><input type="text" name="subject" value="<%=subject1%>"
							style="width: 75px;" /> Class No:</td>
						<td><input type="text" name="classNo" value="<%=edition1%>"
							style="margin-left: -96px; width: 91px;" /></td>
					</tr>
					<tr>
						<td>Edition:</td>
						<td><input type="text" name="edition" value=""
							style="width: 75px;" /> Status:</td>
						<td><input type="text" name="status" value=""
							style="margin-left: -96px; width: 91px;" /></td>
					</tr>
					<tr>
						<td>Year:</td>
						<td><input type="text" name="year" value="<%=year1%>"
							style="width: 75px;" /> Pages:</td>
						<td><input type="text" name="pages" value="<%=pages1%>"
							style="margin-left: -96px; width: 91px;" /></td>
					</tr>
					<tr>
						<td>Cost:</td>
						<td><input type="text" name="cost" value="<%=cost1%>"
							style="width: 75px;" /> Volume:</td>
						<td><input type="text" name="volume" value="<%=volume1%>"
							style="margin-left: -96px; width: 91px;" /></td>
					</tr>
					<tr>
						<td>book Source:</td>
						<td><input type="text" name="source" value="<%=source1%>"
							style="width: 75px;" /> Bill Number:</td>
						<td><input type="text" name="billno" value="<%=billno1%>"
							style="margin-left: -96px; width: 91px;" /></td>
					</tr>
					<tr>
						<td>Additional Info:</td>
						<td><input type="text" name="addi" value="<%=moreinfo1%>"
							style="width: 250px; height: 57px" /></td>
					</tr>
				</table>






			</div>


			<div id="vwevents" style="margin-left: 380px;">

				<img id="photo" src="${WEB_BASE}images/noimage.jpg" alt="your image" />
				<table>
					<tr>
						<td><input type="file" onchange="readURL(this);" class="vw" /></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td><input type="submit" name="jButton2" value="Remove Pic"
							class="vbRemovePic" /></td>
						<td>

							<table>
								<tr>
									<td><input type="submit" name="jButton3" value="Add New"
										class="vw" /></td>
									<td><input type="submit" name="jButton4" value="Edit"
										class="vw" /></td>
								</tr>
								<tr>
									<td><input type="submit" name="jButton5" value="Delete"
										class="vw" /></td>
									<td><input type="submit" name="jButton6" value="Save"
										class="vw" /></td>
								</tr>




							</table>

						</td>
					</tr>
				</table>
			</div>
		</form>
	</div>

	<script>
		/*
		$(function() {
			// Check if the browser supports the date input type
			if (!Modernizr.inputtypes.date) {
				// Add the jQuery UI DatePicker to all
				// input tags that have their type attributes
				// set to 'date'
				$('input[type=date]').datepicker({
					// specify the same format as the spec
					dateFormat : 'yy-mm-dd'
				});
			}
		});
		 */
	</script>
	<jsp:include page="/jsp/footer.jsp" />

</body>
</html>
